package org.example.backend.constant;

/**
 * 响应状态码常量类
 */
public class ResultCode {
    
    /**
     * 成功
     */
    public static final int SUCCESS = 200;
    
    /**
     * 创建成功
     */
    public static final int CREATED = 201;
    
    /**
     * 参数错误
     */
    public static final int BAD_REQUEST = 400;
    
    /**
     * 未授权
     */
    public static final int UNAUTHORIZED = 401;
    
    /**
     * 禁止访问
     */
    public static final int FORBIDDEN = 403;
    
    /**
     * 资源不存在
     */
    public static final int NOT_FOUND = 404;
    
    /**
     * 服务器内部错误
     */
    public static final int SERVER_ERROR = 500;
    
    /**
     * 业务错误
     */
    public static final int BUSINESS_ERROR = 1000;
    
    /**
     * 参数校验失败
     */
    public static final int VALIDATE_FAILED = 1001;
    
    /**
     * 数据已存在
     */
    public static final int DATA_ALREADY_EXISTED = 1002;
    
    /**
     * 数据不存在
     */
    public static final int DATA_NOT_EXISTED = 1003;
    
    /**
     * 库存不足
     */
    public static final int STOCK_NOT_ENOUGH = 1004;
    
    /**
     * 操作频繁
     */
    public static final int OPERATION_TOO_FREQUENT = 1005;
} 